package org.jctc.els.modules.biz.mapper.message;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.jctc.els.modules.biz.entity.message.Message;
import org.jctc.els.modules.biz.entity.message.MessageExpand;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 消息表 Mapper 接口
 * </p>
 *
 * @author lyh
 * @since 2021-02-26
 */
@Mapper
public interface MessageMapper extends BaseMapper<Message> {

    Page<MessageExpand> selectListByPage(@Param("messagePage") Page<MessageExpand> messagePage,
                                         @Param("title") String title,
                                         @Param("messageTypeCode") String messageTypeCode,
                                         @Param("schoolId")Long schoolId);

    MessageExpand selectById(@Param("id") Long id);

    Page<MessageExpand>  selectMessageByUserId(@Param("messagePage") Page<MessageExpand> messagePage, @Param("title") String title, @Param("messageTypeCode") String messageTypeCode, @Param("userId") Long userId);
}
